import { createContext, useContext } from 'react';

type UserType = { name: string; permissions: string[] } | null;
export const UserContext = createContext<{ user: UserType }>({ user: null });
export const useUser = () => useContext(UserContext); 